define(
    function (require) {
        var BaseListModel = require('common/ListModel');
        var Data = require('./Data');
        var datasource = require('er/datasource');
        var name;

        function MallListModel() {
            BaseListModel.apply(this, arguments);
            var entityName = this.getUrlType();
            this.addData(new Data(entityName));
            this.datasource = {
                list: function (model) {
                    return model.data().search().then(
                        function (data) {
                            return data;
                        }
                    );
                }
            };
        }
        
        MallListModel.prototype.prepare = function() {
            var list = this.get('list');
            if (name !== '' && typeof(name) !== 'undefined') {
                for (var i = 0; i < list.data.length; i++) {
                    var item = list.data[i];
                    if (item.name.indexOf(name) < 0) {
                        list.data.splice(i, 1);
                        i--;
                    }
                }
            }
            this.set('list', list);
        };
        
        MallListModel.prototype.find = function(isbn) {
            var list = this.get('list');
            return null;
        };

        require('er/util').inherits(MallListModel, BaseListModel);
        return MallListModel;
    }
);
